# -*- coding:utf8 -*- #
# -----------------------------------------------------------------------------------
# ProjectName:   smalleel-api-tools
# FileName:     stringTomd5
# Author:
# Datetime:    2022/7/6 15:34
# Description：
# -----------------------------------------------------------------------------------
import hashlib


def strTomd5(stringData: str) -> str:
    """
        对字符串进行MD5加密,高位在前
    """
    return hashlib.md5(stringData.encode('utf-8')).hexdigest()


def login_md5(username: str, password: str) -> str:
    return strTomd5(username + username[::-1] + password)


if __name__ == '__main__':
    username = "17828071501"
    password = "123123"
    n = username + username[::-1] + password
    print(strTomd5(n))
